package com.person.ntv.service.base;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import com.person.exception.ServiceException;
/**
 * 
 * @author Administrator
 *
 *单表通用Service接口
 *
 * @param <T>
 */
public interface IBaseService<T>{
	
    public int delete(T t) throws ServiceException;
    
    public int deleteByExample(Object o) throws ServiceException;
    
    public int deleteByPrimaryKey(Object o) throws ServiceException;
    
    public int deleteByIds(String ids) throws ServiceException;;
    
    public int insert(T t) throws ServiceException;
    
    public int insertSelective(T t) throws ServiceException;
    
    public List<T> select(T t) throws ServiceException;
    
    public List<T> selectAll() throws ServiceException;
    
    public List<T> selectByExample(Object o) throws ServiceException;
    
    public List<T> selectByExampleAndRowBounds(Object o,RowBounds rb) throws ServiceException;
    
    public T selectByPrimaryKey(Object o) throws ServiceException;
    
    public List<T> selectByIds(String ids) throws ServiceException;;
    
    public List<T> selectByRowBounds(T t,RowBounds rb) throws ServiceException;
    
    public int selectCount(T t) throws ServiceException;
    
    public int selectCountByExample(Object o) throws ServiceException;
    
    public T selectOne(T t) throws ServiceException;
    
    public int updateByExample(@Param("record") T record, @Param("example") Object example) throws ServiceException;
    
    public int updateByExmapleSelective(@Param("record") T record, @Param("example") Object example) throws ServiceException;
    
    public int updateByPrimaryKey(T t) throws ServiceException;
    
    public int updateByPrimaryKeySelective(T t) throws ServiceException;
    
    public int insertList(List<T> recordList) throws ServiceException;
    
    public int insertUseGeneratedKeys(T record)throws ServiceException;
    
}
